package com.ruoyi.blog.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

import java.util.List;

/**
 * 博客文章对象 blog_article
 * 
 * @author ruoyi
 * @date 2021-05-05
 */
@TableName("blog_article")
public class BlogArticle extends BaseEntity
{
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    /** $column.columnComment */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /** 标题 */
    @Excel(name = "标题")
    private String title;

    /** 内容 */
    @Excel(name = "内容")
    private String content;

    @Excel(name = "原始内容")
    private String text;

    /** 分类ID */
    @Excel(name = "分类ID")
    private Long typeId;

    /** 排序 */
    @Excel(name = "排序")
    private Long sort;

    /** 封面地址 */
    @Excel(name = "封面路径")
    private String cover;

    /** 分类实体类 */
    @TableField(exist = false)
    private BlogType blogType;

    /** 标签字段 */
    private String tags;

    /** 是否置顶 */
    private String top;

    /** 作者 */
    private String author;

    /** 访问量 */
    private Integer viewCount;

    @TableField(exist = false)
    private List<BlogTags> tagsList;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setTitle(String title) 
    {
        this.title = title;
    }

    public String getTitle() 
    {
        return title;
    }
    public void setContent(String content) 
    {
        this.content = content;
    }

    public String getContent() 
    {
        return content;
    }
    public void setTypeId(Long typeId) 
    {
        this.typeId = typeId;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    public Long getTypeId()
    {
        return typeId;
    }
    public void setSort(Long sort) 
    {
        this.sort = sort;
    }

    public Long getSort() 
    {
        return sort;
    }

    public String getCover() {
        return cover;
    }

    public void setCover(String cover) {
        this.cover = cover;
    }

    public BlogType getBlogType() {
        return blogType;
    }

    public void setBlogType(BlogType blogType) {
        this.blogType = blogType;
    }

    public List<BlogTags> getTagsList() {
        return tagsList;
    }

    public void setTagsList(List<BlogTags> tagsList) {
        this.tagsList = tagsList;
    }

    public String getTags() {
        return tags;
    }

    public void setTags(String tags) {
        this.tags = tags;
    }

    public String getTop() {
        return top;
    }

    public void setTop(String top) {
        this.top = top;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public Integer getViewCount() {
        return viewCount;
    }

    public void setViewCount(Integer viewCount) {
        this.viewCount = viewCount;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("title", getTitle())
            .append("content", getContent())
            .append("typeId", getTypeId())
            .append("sort", getSort())
            .append("createTime", getCreateTime())
            .toString();
    }
}
